#include <iostream>
template <typename T1, typename T2>
class MyCalculator
{
private:
    T1 t1;
    T2 t2;

public:
    MyCalculator();
    MyCalculator(T1, T2);
    void showAdd();
};

template <typename T1, typename T2>
inline MyCalculator<T1, T2>::MyCalculator()
{
    std::cout << "MyCalculator 的无参构造方法执行了 ！" << std::endl;
}

template <typename T1, typename T2>
inline MyCalculator<T1, T2>::MyCalculator(T1 t1, T2 t2) : t1(t1), t2(t2) {}

template <typename T1, typename T2>
inline void MyCalculator<T1, T2>::showAdd()
{
    std::cout << t1 + t2 << std::endl;
}